@extends('dashboard.base')

@section('content')
 <!--  <div class="container-fluid"> -->
  <div class="row">
    <div class="col">
        <div class="card">
            <div class="card-header"><strong>添加配送方式</strong></div>
            <div class="card-body">
              <form class="form-horizontal" action="{{ empty($data)? route('admin.delivery.store'):route('admin.delivery.update', $data) }}" method="post">

                @text(['name' => 'name', 'label' => '名称', 'default' => $data->name??'']) @endtext

                @radio([
                  'label' => '是否启用', 
                  'options' => [
                    'name' => 'enabled',
                    'default' => isset($data->is_recommend) ? $data->is_recommend : 1 ,
                    'datas' => [
                      [
                        'option' => '是',
                        'value' => 1,
                      ],

                      [
                        'option' => '否',
                        'value' => '0',
                      ]
                    ]
                  ],
                ])
                @endradio
                
                  @if(!empty($data))
                    @method('PUT')
                  @endif
                @submit @endsubmit  
                @errmsg
                @enderrmsg
            </form>
          </div>
      </div>
    </div>
  </div>  
@endsection